<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    function one(i , sum ,bai){
        console.log(i,sum);
        sum += i;
        if(i == bai){
            return sum;
        }
        return one(i+1 , sum ,bai);
    }
    document.write(one(1 , 0 , 100));
</script>
</html>